import request from '@/utils/request'

// 导出默认对象
export default {
    // 手机号登录
    loginWithPhone(phone, password) {
        return request({
            url: '/user/login/phone',
            method: 'post',
            params: {
                phone,
                password
            }
        })
    },

    // 发送注册验证码
    sendRegisterCode(phone) {
        return request({
            url: '/user/register/code',
            method: 'post',
            data: {
                phone
            }
        })
    },

    // 用户注册
    register(data) {
        return request({
            url: '/user/register/phone',
            method: 'post',
            data
        })
    }
}